package com.rapida.example;

import android.content.Context;

import com.rapida.framwork.PresenterController;

/**
 * Created by mourui on 2015/5/11.
 */
public class NetPresenter extends PresenterController {
    private MainUIController mainUIController;
    private NetConnect netConnect;
    public NetPresenter(MainUIController uiController) {
        mainUIController = uiController;
        netConnect = new NetConnect();
    }

    @Override
    public void onResume() {
    }

    @Override
    public void onPause() {
    }

    public void checkNetwork(Context context) {
        if (netConnect.isNetConnect(context)) {
            mainUIController.startNextActivity();
        } else {
            mainUIController.showNetError();
        }
    }

}
